﻿using System;
using System.Collections.Generic;

using System.Text;

namespace Rance.Battle
{
    public class 赋予解除Behavior : IBehavior
    {
        public 赋予解除Behavior() 
        {
            List = new List<赋予解除BehaviorDetail>();
        }

        public List<赋予解除BehaviorDetail> List { get; set; }

        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            foreach (var item in List)
            {
                sb.Append(string.Format("    {0}失去赋予:", item.角色));
                foreach (var type in item.List)
                {
                    sb.Append(string.Format("{0} ", type));
                }
            }

            return sb.ToString();
        }

        public 赋予解除BehaviorDetail Find(角色Struct 角色)
        {
            foreach (var item in List)
                if (item.角色.Equals(角色))
                    return item;

            return null;
        }
    }

    public class 赋予解除BehaviorDetail
    {
        public 赋予解除BehaviorDetail()
        {
            List = new List<string>();
        }

        public 角色Struct 角色 { get; set; }
        public List<string> List { get; set; }
    }
}
